unit fmSelDateContent;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, fmNormal, StdCtrls, Mask, DBCtrlsEh;

type
  TfrmSelDateContent = class(TfrmNormal)
    DateLabel1: TLabel;
    DB_Date: TDBDateTimeEditEh;
    ContentLabel2: TLabel;
    Memo1: TMemo;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
  function CreateSelDateContent(aFormCaption,DateLab,ContentLab:string;out aDate:TDatetime;out aContent:string):Boolean;
var
  frmSelDateContent: TfrmSelDateContent;

implementation
    uses uShare;
{$R *.dfm}


function CreateSelDateContent(aFormCaption,DateLab,ContentLab:string;out aDate:TDatetime;out aContent:string):Boolean;
begin
  try
    frmSelDateContent := TfrmSelDateContent.Create(application);
    frmSelDateContent.Caption := aFormCaption;
    frmSelDateContent.DateLabel1.Caption := DateLab;
    frmSelDateContent.ContentLabel2.Caption := ContentLab;
    if frmSelDateContent.ShowModal=mrOk then result := true
    else result := false;
    aDate := frmSelDateContent.DB_Date.Value;
    aContent := frmSelDateContent.Memo1.Text;
  finally
    frmSelDateContent := nil;
  end;
end;
procedure TfrmSelDateContent.FormCreate(Sender: TObject);
begin
  inherited;
  DB_Date.Value := uShare.GetServerDatetime();
end;

end.

